package com.pactera.madp.cp.controller.sidebar.wxgzh;

import com.pactera.madp.cp.api.dto.wxGZH.WxGZHDto;
import com.pactera.madp.cp.api.vo.wxgzh.GzhMsgVo;
import com.pactera.madp.cp.service.ICbService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/msgcb")
@Api(value = "msgCB" ,tags = "消息回调")
public class CbController {

    @Autowired
    private ICbService iCb;

    /**
     * 自动回复接口
     * @param dto
     * @return
     */
    @PostMapping("/remsg")
    @ApiOperation(value = "自动回复接口")
    public GzhMsgVo autoAnswer(@RequestBody WxGZHDto dto) {
        return iCb.handCB(dto);
    }
    @PostMapping("/sendService")
    public String sendService(@RequestBody GzhMsgVo vo) {
        return iCb.sendService(vo);
    }

}
